Current Location: Home> Function Categories> tanh

tanh

Hyperbolic tangent
Name:tanh
Category:math
Programming Language:php
One-line Description:Hyperbolic tangent.

Definition and usage

tanh() function returns a hyperbolic tangent.

Example

In this example, we will return a hyperbolic tangent for different numbers:

 <?php
echo ( tanh ( M_PI_4 ) ) ;
echo ( tanh ( 0.50 ) ) ;
echo ( tanh ( - 0.50 ) ) ;
echo ( tanh ( 5 ) ) ;
echo ( tanh ( 10 ) ) ;
echo ( tanh ( - 5 ) ) ;
echo ( tanh ( - 10 ) )
?>

Try it yourself

grammar

 tanh ( x )
parameter describe
x Required. A number.

illustrate

Returns the hyperbolic tangent value of x , defined as sinh(arg)/cosh(arg).

Similar Functions
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Exponential expressions pow

    pow

    Exponentialexpressio
  • Further method to sort ceil

    ceil

    Furthermethodtosort
  • Round the division result intdiv

    intdiv

    Roundthedivisionresu
  • Determine whether it is a legal value is_nan

    is_nan

    Determinewhetheritis
  • Convert angle to radians deg2rad

    deg2rad

    Convertangletoradian
  • Calculate the oblique length of a straight triangle hypot

    hypot

    Calculatetheobliquel
  • Returns exp(number) - 1, and can calculate the exact result even when the value of number is close to zero. expm1

    expm1

    Returnsexp(number)-1
Popular Articles